class Facade {
    subsystem1: SubSystem1;
    subsystem2: SubSystem2;

    constructor(subsystem1: SubSystem1, subsystem2: SubSystem2) {
        this.subsystem1 = subsystem1;
        this.subsystem2 = subsystem2;
    }

    operate() {
        this.subsystem1.dosomething1();
        this.subsystem2.dosomething2();
    }
}

class SubSystem1 {
    dosomething1() {
        console.log('subsystem 1 dosomething 1');
    }
}

class SubSystem2 {
    dosomething2() {
        console.log('subsystem 2 dosomething 2');
    }
}

const fa = new Facade(new SubSystem1(), new SubSystem2());
fa.operate();